<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="com.ereport.entity.Projects"%>
<%@page import="java.util.List"%>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
    $('#pTable').dataTable();
    $("#pTable").colResizable();
});
</script>
<%
    List<Projects> prList=(List<Projects>)request.getAttribute("prList");
%>
<table width="100%" border="0" align="center"  cellpadding="5" cellspacing="1" bgcolor="#787878"  id="pTable" >
                   <thead>
                  <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                   	<th width="5%"  height="30" align="center" valign="middle"  class="hed"  style="background-repeat:repeat-x">S.No</th>
                   	<th width="14%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Project Name</th>
                   	<th width="14%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Project Type</th>
                    <th width="19%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x"> Organisation </th>
                    <th width="10%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Division</th>
                    <th width="19%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Industry Type</th>
                   	<th width="13%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Created Date</th>
                   	<th width="13%"  align="center" valign="middle"  class="hed"   style="background-repeat:repeat-x">Executive</th>
                 </tr>
                  </thead>
                  <tbody>
                  <%
                  if(prList!=null){
                  	for(int i=0;i<prList.size();i++){
                   	//System.out.println("aclist "+aclist.get(i).getContactName());
                  %>
                  <tr >
                   <%
                          String lcdate="";
                   
                         Date ldt=prList.get(i).getCreatedDate();
                         if(ldt!=null){
                          DateFormat ldft=new SimpleDateFormat("dd-MM-yyyy");
                          	lcdate=ldft.format(ldt.getTime());
                         }
                         
                    %>
                    <td bgcolor="#cccccc" align="center"><%=i+1 %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <a href="javascript:getProj('<%=prList.get(i).getProjectName() %>')" style="color: #1d7d92"><%=prList.get(i).getProjectName() %></a></td>
		            <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=prList.get(i).getTypeOfProj() %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=prList.get(i).getOrgName() %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=prList.get(i).getDivision() %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=prList.get(i).getTypeOfIndustry() %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=lcdate %></td>
                    <td align="center" valign="top" bgcolor="#cccccc" class="tableCell">
                    <%=prList.get(i).getExeId().getExeName() %></td>
                 </tr>
                 <%
                  	}
                  	
                  }
                 %>
                </tbody>
                </table>  